<?php
/*******************************************
	Website static and dynamic content
*******************************************/

// Avoid direct access
if(substr_count($_SERVER['PHP_SELF'], 'en_EN.php') > 0) {
	header("HTTP/1.0 404 Not Found");
	exit;
}


class Language extends Curl{

	// Homepage content
	const CONTENT_HOME = '<h3>Welcome</h3><p>SOAS is a leader in the study of Asia, Africa and the Middle East, and our library with its Archives &amp; Special Collections is the HEFCE-designated National Research Library for these regions of the world.</p><p>We are in the process of putting our collections of rare manuscripts, books, photographs, audio and film material on-line, to be freely available for everyone.</p><p>The first collection to be made available is the photographic archive of Christoph von F&uuml;rer-Haimendorf (1909-1995). This collection is widely recognised as the world\'s most comprehensive visual documentation of tribal cultures in South Asia and the Himalayas.</p><p>All material on this site is freely available for non-commercial use under <a href="http://creativecommons.org/licenses/by-nc/3.0/">Creative Commons licence</a>. <a href="/cgi/w/Contact">Contact us</a> if you need larger files sizes or a commercial use licence.</p><p>This Web site is under continual development, so please check back frequently for new features. If you find something that doesn\'t work or that you think would make a useful addition, please use the Feedback link at the bottom of the page.</p>';
	
	
	// Image templates
	const CONTENT_IMAGE_CAPTIONONLY = '<div class="row"><a title="View Full Screen Image" href="XX__FULLSCREEN__XX"><img class="captioned" src="XX__IMGSRC__XX" /></a>
								 		<p class="caption-image">XX__CAPTION__XX<br />[<a title="View Full Screen Image" href="XX__FULLSCREEN__XX">Full Screen Image</a>]</p></div>';
								 		
	const CONTENT_IMAGE_MAINTAB = 'XX__REFERER__XX<h3>XX__TITLE__XX</h3><a title="View Full Screen Image" href="XX__FULLSCREEN__XX"><img class="captioned" src="XX__IMGSRC__XX" /></a><p class="caption-image">[<a title="View Full Screen Image" href="XX__FULLSCREEN__XX">Full Screen Image</a>]XX__SAVE_IN_SEARCHES__XX</p><h4>Description</h4><p class="caption-image">XX__DESCRIPTION__XX</p><h4>Date</h4><p class="caption-image">XX__DATE__XX</p><h4>Location</h4><p class="caption-image">XX__LOCATION__XX</p><br />XX__SUBMENU__XX';
	
	/*
	OLD!
	const CONTENT_IMAGE_INFOTAB = '<h3>XX__TITLE__XX</h3><h4>Catalogue reference</h4><p class="caption-image">XX__CATALOGUE_REFERENCE__XX</p><h4>Collection</h4><p class="caption-image">XX__COLLECTION__XX</p><h4>Description</h4><p class="caption-image">XX__DESCRIPTION__XX</p><h4>Ethnic group</h4><p class="caption-image">XX__ETHNIC_GROUP__XX</p><h4>Location</h4><p class="caption-image">XX__LOCATION__XX</p><h4>For citation use</h4><p class="caption-image">XX__FOR_CITATION_USE__XX</p><h4>Format of Original</h4><p class="caption-image">XX__FORMAT_OF_ORIGINAL__XX</p><h4>Original reference</h4><p class="caption-image">XX__ORIGINAL_REFERENCE__XX</p><h4>Copy taken by</h4><p class="caption-image">XX__COPY_TAKEN_BY__XX</p><h4>Date of Copy</h4><p class="caption-image">XX__DATE_OF_COPY__XX</p><h4>License</h4><p class="caption-image">XX__LICENSE__XX</p><br />XX__SUBMENU__XX';	*/	


	const CONTENT_IMAGE_INFOTAB = '<h3>XX__TITLE__XX</h3>XX__ITEMS__XX<br />XX__SUBMENU__XX';
	const CONTENT_IMAGE_INFOTAB_ITEM = '<h4>XX__TITLE__XX</h4><p class="caption-image">XX__VALUE__XX</p>';
	
	
	const CONTENT_IMAGE_FULLSCREEN = '<img src="XX__IMAGE__XX" /><br />XX__TITLE__XX<br /><a href="XX__BACK__XX" title="Go back to the previous page">Back</a>';					 	

	const CONTENT_IMAGE_COMMENTTAB = '<h3>Comments to "XX__TITLE__XX"</h3><img class="captioned" src="XX__IMAGE_SRC__XX"><h4>Leave a comment</h4>XX__ADD_COMMENT__XX<br /><a id="comments"></a>XX__COMMENTS__XX<br />XX__PAGINATION__XXXX__SUBMENU__XX';		
	const CONTENT_IMAGE_ADDCOMMENTTAB = '<h3>Write a comment to "XX__TITLE__XX"</h3>XX__CONTENT__XX<br />XX__SUBMENU__XX';			
	
	// Search page content
	const CONTENT_SEARCH = '<h3>Search the digital archives</h3>XX__ERROR__XXXX__BACK__XX<form action="search-result" method="get"><fieldset><input type="hidden" value="XX__SESSION__XX" name="PHPSESSID" /><label>Search XX__SEARCHIN__XX</label><input type="hidden" name="collection" value="XX__COLLECTION__XX" /><input name="q" type="text" value="XX__SEARCH__XX" /><br /><input type="submit" name="search" id="search" value="Search" /></fieldset></form>';

	// Search result page content
	const CONTENT_SEARCH_RESULT = '<h3>Results for "XX__SEARCH__XX"</h3><h5>Order</h5><form method="GET" action="XX__ACTION__XX">XX__HIDDEN_FIELDS__XX<fieldset><select name="order" id="order"><option value="date_of_original_from/title" XX__DATESEL__XX>by year (oldest first)</option><option value="date_of_original_from/title" XX__DATEDESCSEL__XX>by year (most recent first)</option><option value="title/-date_of_original_from" XX__TITLESEL__XX>by title (a-z)</option><option value="-title/-date_of_original_from" XX__TITLEDESCSEL__XX>by title (z-a)</option></select></fieldset><br /><input type="submit" name="sort" id="sort" value="Sort Result" /></form><br /><h5>Refine Search</h5><form method="GET" action="XX__ACTION__XX">XX__HIDDEN_FIELDS_SEARCH__XX<input name="q" type="text" value="XX__SEARCH__XX" /><br /><input type="submit" name="search" id="search" value="Search Again" />XX__SAVE__XX</form> <br />XX__IMAGES__XXXX__PAGINATION__XX';
	
	const CONTENT_SEARCH_SAVE_BUTTON = ' or <a href="XX__HREF__XX" title="Save Search">Save</a>';
	
	const CONTENT_SEARCH_BACK = '<p class="top"><a href="XX__BACK__XX" title="Go back to the previous page">Back</a></p>';
	
	const SEARCH_SAVED = 'Successfully stored search';
	
	const SEARCH_DELETED = 'Successfully deleted search';
	
	const SEARCH_UPDATED = 'Successfully updated search';
	
	const SEARCHES_NO_SAVED_SEARCHES = '<p>No saved searches</p>';
	
	const SEARCHES_SEARCH = '<h5>XX__TITLE__XX</h5><p class="caption-image"><a href="XX__DO_SEARCH_LINK__XX" title="Do search">Do search</a> | <a href="edit-saved-search?XX__SESSION__XX&id=XX__SAVEDSEARCHID__XX" title="Edit saved search">Settings</a> | <a href="saved-searches?XX__SESSION__XX&action=remove&id=XX__SAVEDSEARCHID__XX" title="Remove search">Remove</a></p><br />';	
	
	const CONTENT_SEARCH_SAVED_SEARCHES = '<h3>Saved searches</h3>XX__ERROR__XXXX__SEARCHES__XX';
	
	const CONTENT_EDIT_SAVED_SEARCH = '<a id="error"></a>XX__ERROR__XX<form action="edit-saved-searchXX__SESSION__XX&id=XX__ID__XX#error" method="post"><fieldset><h3>Edit Saved Search</h3>XX__HIDDENFIELDS__XX<label>Name of search</label><br />XX__TITLE__XX <br /><label>Frequency of saved search email<br /><select name="c3_frequency"><option value="never" XX__FREQUENCY_NEVER_SEL__XX>Never</option><option value="daily" XX__FREQUENCY_DAILY_SEL__XX>Once per Day</option><option value="weekly" XX__FREQUENCY_WEEKLY_SEL__XX>Once per Week</option><option value="monthly" XX__FREQUENCY_MONTHLY_SEL__XX>Once per Month</option></select></label><br /><br />Mail empty results:<br />XX__MAIL_EMPTY__XX<label>Yes, mail me empty alerts.</label><br />XX__MAIL_NOTEMPTY__XX <label>No. Only mail me alerts with content.</label><br /><br />Make search public:<br />XX__SEARCH_PUBLIC__XX<label>Yes, make this search available to anyone.</label><br />XX__SEARCH_NOTPUBLIC__XX <label>No. Only I will have access to this search.</label><br /><br /><input type="submit" name="_action_save" id="update" value="Update" /></fieldset></form>';
	
	const CONTENT_SAVE_IMAGE = ' | [<a title="Save" href="saved-searches?XX__SESSION__XX&eprintid=XX__EPRINTID__XX">Save in "Saved Searches"</a>]';
		
	
	// Login page content
	const CONTENT_LOGIN = '<h3>Login</h3>XX__ERROR__XX<form action="loginXX__REDIRECT__XX" method="post"><fieldset><label>Email</label><input name="username" type="text" value="XX__USER__XX" /><br /><label>Password</label><input name="password" type="password" value="" /><br /><input type="submit" name="login" id="login" value="Login" /></fieldset></form>';
	
	
	// Register page content
	const CONTENT_REGISTER = '<h3>Register</h3><p>As a registered user you will be able to set up saved searches, which are sent when new items are placed in the repository. You can also create multiple albums and save them for next time you login.</p><p>Please complete the details on this page to register with Digital Archives and Special Collections.</p><p>The registration process uses email to send you details of how to activate your account. You must then check your email and activate your password. Once activated you can start to use the registered features of the repository.</p><p>By creating an account you are agreeing to abide by the <a href="/php/mobile/conditions-of-use">Terms and Conditions</a> of this site.</p><br /><h5><i>Your username will be in the form "Title" + "Given Name" + "Family Name"</i></h5><br /><a id="error"></a>XX__ERROR__XX<form action="register#error" method="post"><fieldset><label>* Your email address</label><input name="email" type="text" value="XX__EMAIL__XX" /><br /><label>Title</label><input name="title" type="text" value="XX__TITLE__XX" /><br /><label>* Given Name</label><input name="name" type="text" value="XX__NAME__XX" /><br /><label>* Family Name</label><input name="surname" type="text" value="XX__SURNAME__XX" /><br /><label>* Password</label><input name="password" type="password" value="" /><br /><input type="submit" name="register" id="register" value="Register" /></fieldset></form><br /><h5><i>* Compulsory fields</i></h5>';	
	
	// Successfully registration
	const CONTENT_REGISTER_SUCCESS = '<h3>Register</h3><p>You have registered with username "XX__EMAIL__XX".</p><p>This registration <em>will not</em> be activated until you visit the confirmation URL which has been emailed to "XX__EMAIL__XX"</p>';
	
	
	const REGISTER_NOSUCCESS = 'There are currently no changes for this user which await confirmation. This probably means you have already confirmed the change. Try to <a href="login" title="Login">login</a>';
	
	const CONTENT_ACTIVATE_SUCCESS = '<p>Your account has been successfully activated</p><br /><p>You can <a href="login" title="Login">login here</a></p>';
	
	
	const CONTENT_ACTIVATE = '<h3>Activate Account</h3><p>XX__TEXT__XX</p>';
	
	
	// Profile page
	const CONTENT_PROFILE = '<a id="error"></a>XX__ERROR__XX<form action="profileXX__SESSION__XX#error" method="post"><fieldset><h3>Account Details</h3>XX__HIDDENFIELDS__XXXX__HIDEEMAILVISIBLE__XX <label>Make email visible to all.</label><br />XX__HIDEEMAILHIDE__XX <label>Hide email to all except repository administrators</label><br /><p class="info">This option allows or prevents a users email being shown on their public summary page.</p><br /><label>Password</label> XX__PASSWORD__XX<p class="info">Leaving this field blank will not affect the password.</p><br /> <h3>Personal Details</h3><label>Title</label><br />XX__TITLE__XX <br /><label>* Given Name</label><br />XX__NAME__XX<br /><label>* Family Name</label><br />XX__SURNAME__XX<br /><br /><label>Department</label><br />XX__DEPARTMENT__XX<br /><label>Organisation</label><br />XX__ORGANISATION__XX<br /><label>Address</label><br />XX__ADDRESS__XX<label>Country</label><br />XX__COUNTRY__XX<br /><br /><label>Homepage URL</label><br />XX__URL__XX<br /><br /><input type="submit" name="update" id="update" value="Update" /></fieldset></form><br /><h5><i>* Compulsory fields</i></h5>';
	const PROFILE_SUCC_UPDATE		= 'Profile successfully updated';
	
	
	
	
	// Menus (header, footer, pages)
	const MENU_LOGIN				= 'Login';
	const MENU_CREATE_ACCOUNT		= 'Create Account';
	const MENU_LOGOUT				= 'Logout';
	const MENU_PROFILE				= 'Profile';
	const MENU_HOME					= 'Home';
	const MENU_ABOUT				= 'About';
	const MENU_COLLECTIONS			= 'Collections';
	const MENU_CONTACT_US			= 'Contact Us';
	const MENU_CONTACT				= 'Contact';
	const MENU_SEARCH_TITLE			= 'Search the digital archives';
	const MENU_SEARCH				= 'Search';
	const MENU_SAVED_SEARCHES		= 'Saved searchs';
	
	const MENU_IMAGE				= 'Image';
	const MENU_MORE_INFO			= 'More Information';
	const MENU_MORE					= 'More Info';
	const MENU_READ_MORE			= 'Read More';
	const MENU_READ_LESS			= 'Less';
	const MENU_COMMENTS				= 'Comments';
	const MENU_RELATED_IMAGES		= 'User-contributed items';
	const MENU_ADD_COMMENT			= 'Add Comment';
	const MENU_VIEW_IMAGE			= 'View Image';
	
	
	// Template
	const TEMPLATE_META_TITLE		= 'SOAS Digital Archives &amp; Special Collections';
	const TEMPLATE_TITLE			= 'SOAS ARCHIVES &amp; SPECIAL COLLECTIONS';
	const TEMPLATE_BACKTOTOP		= 'Back to top';
	const TEMPLATE_DESKTOP			= 'Desktop website';
	const TEMPLATE_SWITCH_DESKTOP	= 'Switch to our desktop site';
	const TEMPLATE_TERMS			= 'Conditions of Use';
	const TEMPLATE_FEEDBACK			= 'Feedback';
	const TEMPLATE_FEEDBACK_SUB		= 'Feedback from Digital Archive and Special Collections Web site';
	const TEMPLATE_FEEDBACK_BODY	= 'Let us know what you think or how we can help you';
	
	
	
	// Errors
	// Error 404: page not found content
	const CONTENT_NOT_FOUND = '<h3>Error</h3><p>The specified file could not be found on this server.  If you reached this page by following a link within the repository, please contact the <a href="mailto:cedaame@soas.ac.uk">Digital Archives and Special Collections administration</a>.  Otherwise, please check that you have typed the URL in correctly, or contact the person or site that supplied you with this URL.</p>';
	
	const ERROR_INCORRECT_LOGIN		= 'Incorrect username or password.';	
	const ERROR_INCORRECT_EMAIL		= "E-mail is not valid";
	const ERROR_INCORRECT_EMAIL2	= 'You have not filled in the "Your email address" field.';
	const ERROR_INCORRECT_NAME		= 'You have not filled in the "Given Name" field';	
	const ERROR_INCORRECT_SURNAME	= 'You have not filled in the "Family Name" field';	
	const ERROR_INCORRECT_PWD		= 'You have not filled in the "Password" field.';	
	const ERROR_GENERIC				= "There has been an error, please try again.";	
	const ERROR_SAVE				= "There has been an error saving your data, please try again.";	
	const ERROR_RETRIVE				= "There has been an error retrieving your data, please try again.";	
	const ERROR_EMAIL_EXIST			= 'A user with the email address "XX__EMAIL__XX" already exists.';	
	const ERROR_ERROR				= "You have not filled in the 'XX__ERROR__XX' field";	
	const ERROR_NOT_VALID			= "XX__ERROR__XX is not valid";	
	const ERROR_SAVE_SEARCH			= "That search has expired or was not created by you!";	
	const ERROR_CAPTCHA				= "Sorry we could not verify the text entered into the box below. Please try again.";
	const ERROR_TEXT				= "The text can't be empty";	
	
	const IOS_FAIL					= "Dear iOS user, please save your email as draft and attach the item you want to submit from directly your media gallery.";
	
	
	
	// Comments
	const COMMENTS_NOCOMMENT		= "<h4>No comments on this item</h4>";	
	const COMMENTS_COMMENT			= '<h5>XX__TITLE__XX</h5><a id="XX__COMMENT_ID__XX"></a><p class="caption-image">XX__COMMENT__XX</p><p class="caption-image">XX__USER__XX</p>';	
	const COMMENTS_NEEDLOGIN		= '<p class="caption-image"><a title="Sign in" href="login">Sign in</a> or <a title="Register" href="register">Register</a> to leave a comment</p>';	
	const COMMENTS_COMMENTFORM		= '<a id="error"></a>XX__ERROR__XX<form action="XX__ACTION__XX#error" method="post"><fieldset><textarea name="text">XX__COMMENT__XX</textarea><input value="/XX__IMAGEID__XX/" name="target" type="hidden"><input value="XX__IMAGEID__XX" name="eprintid" type="hidden"><br />XX__RECAPTCHA__XX<input value="Post comment" type="submit"></fieldset></form>XX__NOT_LOGGED__XX';	
	const COMMENTS_EDITCOMMENTFORM	= '<form action="XX__ACTION__XX" method="post"><fieldset><textarea name="text">XX__COMMENT__XX</textarea><input value="/XX__IMAGEID__XX/" name="target" type="hidden"><input value="XX__IMAGEID__XX" name="eprintid" type="hidden"><input value="XX__S__XX" name="s" type="hidden"><input value="XX__COMMENTID__XX" name="commentid" type="hidden"><br /><input value="Update comment" type="submit"> | <a href="XX__CANCEL__XX" title="Cancel">Cancel</a></fieldset></form>';	

	const COMMENT_CAPTCHA			= '<br />Type the word (*) <input type="text" name="captcha" /><br />';
	const COMMENT_NOTLOGGED			= '<br /><h5>* Comments will be anonymous. To comment under your name and remove the \'anti-bot\' device to the left please <a title="Log on" href="login">log on</a>.</h5>';
	
	// Collection
	const CONTENT_COLLECTION_MAINTAB = '<h3>XX__TITLE__XX</h3><img class="captioned" src="XX__IMAGE_SRC__XX" alt="XX__IMAGE_ALT__XX" width="XX__IMAGE_WIDTH__XX" height="XX__IMAGE_HEIGHT__XX" /><br /><h4>Description</h4><p class="caption-image">XX__DESCRIPTION__XX</p><br /><p><a title="Read more about the collection" href="XX__INFO__XX">Read more about the collection</a></p><p><a title="Browse the entire collection" href="XX__BROWSE__XX">Browse the entire collection</a></p><p><a title="Search this collection" href="XX__SEARCH__XX">Search this collection</a></p>';
	
	const CONTENT_COLLECTION_INFO = '<h3>XX__TITLE__XX</h3>XX__CONTENT__XX<br />XX__SUBMENU__XX';

	const CONTENT_BROWSE_COLLECTION = '<h3>Browse Collection</h3><h5>Order</h5><form method="GET" action="XX__ACTION__XX">XX__HIDDEN_FIELDS__XX<fieldset><select name="order" id="order"><option value="date_of_original_from/title" XX__DATESEL__XX>by year (oldest first)</option><option value="-date_of_original_from/title" XX__DATEDESCSEL__XX>by year (most recent first)</option><option value="title/-date_of_original_from" XX__TITLESEL__XX>by title (a-z)</option><option value="-title/-date_of_original_from" XX__TITLEDESCSEL__XX>by title (z-a)</option></select></fieldset><br /><input type="submit" name="sort" id="sort" value="Sort Result" /></form><br />XX__IMAGES__XXXX__PAGINATION__XX';
	
	// related images (User-contributed items)
	const RELATED_NEEDLOGIN			= '<p class="caption-image"><a title="Sign in" href="login">Sign in</a> or <a title="Register" href="register">Register</a> to upload a related item</p>';
	
	const RELATED_NORELATED			= "<h4>There are no user-contributed items</h4>";
	
	const RELATED_SEND_FORM			= '<p>To start submission please fill out the form below. You will then be required to attach your media file to an autogenerated email and send.</p><form id="deposit_form" action="mailto:XX__EMAIL__XX"  method="get"><fieldset><label for="title">Title: </label><input id="title" type="text" name="title"/><label for="abstract">Description: </label><textarea id="abstract" name="abstract"></textarea><a id="sendMail" class="buttony_link" href="#" onclick="emailDepositForm();">Start Submission</a></fieldset></form><br /><h5>[<a title="Sumbmission issues solution" href="submit-related-itemXX__URI__XX">Having issues submitting?</a>]</h5>';
	
	const CONTENT_IMAGE_RELATEDTAB	= '<h3>User-contributed items for "XX__TITLE__XX"</h3><img class="captioned" src="XX__IMAGE_SRC__XX"><h4>Send an image</h4>XX__SEND_RELATED__XX<br /><h5>Order</h5><form method="GET" action="XX__ACTION__XX">XX__HIDDEN_FIELDS__XX<fieldset><select name="order" id="order"><option value="date_of_original_from/title" XX__DATESEL__XX>by year (oldest first)</option><option value="-date_of_original_from/title" XX__DATEDESCSEL__XX>by year (most recent first)</option><option value="title/-date_of_original_from" XX__TITLESEL__XX>by title (a-z)</option><option value="-title/-date_of_original_from" XX__TITLEDESCSEL__XX>by title (z-a)</option></select></fieldset><br /><input type="submit" name="sort" id="sort" value="Sort Result" /></form><br />XX__RELATED__XX<br />XX__PAGINATION__XXXX__SUBMENU__XX';
	
	const RELATED_SUCCESS			= 'To complete the procedure please attach your media file to the autogenerated email and send it';
	
	const RELATED_SEND_ANOTHER		= 'Send another media';
	
	const RELATED_GO_BACK			= ' or go back';
	const RELATED_GO_BACK_TITLE		= 'Go Back';
	const RELATED_SUBMISSION_ISSUES = '<br /><h5>[<a title="Sumbmission issues solution" href="submit-related-itemXX__URI__XX">Having issues submitting?</a>]</h5>';
	
	const CONTENT_SUBMISSION_EMAIL = '<br /><p>If you are having issues submitting a related item please send an email to <a href="mailto:XX__EMAIL__XX?subject=XX__IMAGE__XX">XX__EMAIL__XX</a> using the following format:<br /><br /><strong>Subject</strong>: XX__IMAGE__XX<br /><strong>Body</strong>: <ul><li>Item title [new line]</li><li>Item description</li></ul><br /><span class="error">Remember to attach your item and send the email using the address you\'ve used when registered to the website</span></p><p><a href="XX__BACK__XX" title="Go back to the previous page">Back</a></p>';					 
	

}